{% extends 'admin/model/edit.html' %}

{% block body %}
    {#    {% call lib.form_tag(form) %}#}
    {#        {{ lib.render_form_fields(form, form_opts=form_opts) }}#}
    {#        <div class="form-buttons">#}
    {#            {{ lib.render_form_buttons(return_url) }}#}
    {#        </div>#}
    {#    {% endcall %}#}
    <div class="box box-primary">
        <div class="box-header">
            {% block header_text %}
{#                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>#}
{#                </button>#}
                <div class="box-title">{{ _gettext('Edit Record') + ' #' + request.args.get('id') }}</div>
            {% endblock %}
        </div>
        <div class="box-body">
            {% block edit_form %}
                {{ lib.render_form(form, return_url, extra=None, form_opts=form_opts,
                         action=url_for('.edit_view', id=request.args.get('id'), url=return_url),
                         is_modal=True) }}
            {% endblock %}
        </div>
    </div>
{% endblock %}